#!/bin/bash
source /usr/local/backups/config

if [ -z $1 ]; then
	echo "Missing collection as param 1"
	echo "Possible collections:"
	cat $COLLECTION_LIST
	exit
fi

if [ -z $2 ]; then
	echo "Missing file to restore as param 2"
	exit
fi

if [ -z $3 ]; then
	echo "Missing target as param 3"
	exit
fi

$DUPLICITY restore --file-to-restore $2 $DEST_ROOT/$1 $3
